
<textarea name="code" class="java" style="display:none;">
final Store store = new SimpleStore(new String[]{"abbr", "states"}, SampleData.getStates());

Form form = new Form();
ComboBox cb = new ComboBox(new ComboBoxConfig() {
    {
        setMinChars(1);
        setFieldLabel("State");
        setStore(store);
        setDisplayField("states");
        setMode("local");
        setTriggerAction("all");
        setEmptyText("Enter state");
        setLoadingText("Searching...");
        setTypeAhead(true);
        setSelectOnFocus(true);
        setWidth(250);
    }
});
form.add(cb);
form.render();
</textarea>

<script class="javascript">
    dp.SyntaxHighlighter.HighlightAll('code');
</script>
